package ru.ifmo.kis.domaingen;

import javax.persistence.*;

// Nov 24, 2010 4:04:21 PM
@Table(name = "deliveries", catalog = "ItmoKis")
@Entity
public class DeliveriesEntity {
	private int id;

	@Column(name = "id", nullable = true, insertable = true, updatable = true, length = 10, precision = 0)
	@Id
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	private int approved;

	@Column(name = "approved", nullable = true, insertable = true, updatable = true, length = 10, precision = 0)
	@Basic
	public int getApproved() {
		return approved;
	}

	public void setApproved(int approved) {
		this.approved = approved;
	}

	private int finished;

	@Column(name = "finished", nullable = true, insertable = true, updatable = true, length = 10, precision = 0)
	@Basic
	public int getFinished() {
		return finished;
	}

	public void setFinished(int finished) {
		this.finished = finished;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;

		DeliveriesEntity that = (DeliveriesEntity) o;

		if (approved != that.approved) return false;
		if (finished != that.finished) return false;
		if (id != that.id) return false;

		return true;
	}

	@Override
	public int hashCode() {
		int result = id;
		result = 31 * result + approved;
		result = 31 * result + finished;
		return result;
	}
}
